Mobile device and method for executing music-related application

ABSTRACT

Provided are a mobile device, a method for operating the same, and a non-transitory computer readable storage medium. The mobile device includes a touch display configured to sense a user input; a memory; and a processor configured to examine, upon receiving the user input for generating an audio file from the touch display, characteristics of the user input and characteristics of a first audio included in first audio data stored in the memory, generate melody data based on the characteristics of the user input and the characteristics of the first audio, generate a second audio based on the melody data and chord information included in the first audio data, and generate the audio file by combining the generated second audio with the first audio.

PRIORITY

This application claims priority under 35 U.S.C. § 119(a) to a KoreanPatent Application filed on Feb. 24, 2017 in the Korean IntellectualProperty Office and assigned Serial number 10-2017-0024976, the entiredisclosure of which is incorporated herein by reference.

BACKGROUND 1. Field of the Disclosure

The present disclosure relates to an electronic device that enablesmusic composition, and more particularly, to an electronic device thatenables music composition based on drawing input and to a method foroperating the electronic device.

2. Description of the Related Art

Various electronic devices such as a smartphone, a tablet personalcomputer, a portable multimedia player (PMP), a personal digitalassistant (PDA), a laptop personal computer, and a wearable device arebecoming popular.

Due to the popularization of various electronic devices, techniques andapplications have been developed that enable or assist users to composemusic using electronic devices.

Such a composition support application may display musical instrumentsused to perform a piece of music to generate sounds corresponding to theindividual musical instruments, respectively. A user may generate soundsby playing the displayed musical instruments, and the generated soundsmay be combined to constitute one piece of music. However, if theaccompaniment provided by the composition support application and themelody composed by the user do not match each other in a chord or thelike, the quality of the music composed by the user may be diminished.

In addition, a user who does not know how to play an instrument cannotreadily use a composition support application.

SUMMARY

Aspects of the present disclosure address at least the above mentionedproblems and/or disadvantages and provide at least the advantagesdescribed below.

An aspect of the present disclosure is to provide a mobile device andmethod for operating the same that enable music composition based ondrawing input from a user.

Another aspect of the present disclosure provides an electronic deviceand method for operating the same that enable music composition byreadily generating melody data including a main melody of music based ondrawing input from a user.

Another aspect of the present disclosure provides an electronic deviceand method for operating the same that enable music composition thatgenerates a melody so that a pitch of an accompaniment is similar tothat of a main melody by applying a chord of a music package selected bya user to a melody source corresponding to a drawing input from theuser.

Another aspect of the present disclosure provides an electronic deviceand method for operating the same that enable music composition thatgenerates a variety of sound effects that reflect a characteristics of auser gesture input and a characteristics of a music package to enable auser to compose high-quality music.

In accordance with an aspect of the present disclosure, there isprovided a mobile device. The mobile device includes a touch displayconfigured to sense a user input; a memory; and a processor configuredto examine, upon receiving the user input for generating an audio filefrom the touch display, characteristics of the user input andcharacteristics of a first audio included in first audio data stored inthe memory; generate melody data based on the characteristics of theuser input and the characteristics of the first audio; generate a secondaudio based on the melody data and chord information included in thefirst audio data; and generate the audio file by combining the generatedsecond audio with the first audio.

In accordance with another aspect of the present disclosure, there isprovided a method for operating a mobile device. The method includesreceiving a first user input for selecting a music package including afirst audio and characteristics of the first audio; identifying thecharacteristics of the first audio; receiving a second user input forgenerating an audio file from a touch display capable of sensing userinput; identifying characteristics of the second user input; generatingmelody data based on the characteristics of the second user input andthe characteristics of the first audio; generating a second audio basedon the melody data and chord information included in the first audiodata; and generating the audio file by combining the generated secondaudio with the first audio.

In accordance with another aspect of the present disclosure, there isprovided a non-transitory computer-readable storage medium storing acomputer program configured to implement an operation method for amobile device, wherein the computer program, when executed, causes themobile device to receive a first user input for selecting a musicpackage including a first audio and characteristics of the first audio;identify the characteristics of the first audio; receive a second userinput for generating an audio file from a touch display capable ofsensing user input; identify characteristics of the second user input;generate melody data based on the characteristics of the second userinput and the characteristics of the first audio; generate a secondaudio based on the melody data and chord information included in thefirst audio data; and generate the audio file by combining the generatedsecond audio with the first audio.

BRIEF DESCRIPTION OF THE DRAWINGS

The above and other aspects, features, and advantages of the presentdisclosure will be more apparent from the following detaineddescription, taken in conjunction with the accompanying drawings, inwhich:

FIG. 1 is a block diagram of an electronic device in a networkenvironment according to an embodiment of the present disclosure;

FIG. 2 is a block diagram of an electronic device according to anembodiment of the present disclosure;

FIG. 3 is a block diagram of an electronic device according to anembodiment of the present disclosure;

FIG. 4 is a block diagram of an electronic device according to anembodiment of the present disclosure;

FIG. 5 is a method of generating an audio file in an electronic deviceaccording to an embodiment of the present disclosure;

FIGS. 6A, 6B, 6C, and 6D are illustrations of drawing input and melodymodulation based thereon in an electronic device according to anembodiment of the present disclosure;

FIGS. 7A, 7B, 7C, 7D, and 7E are screen representations depicting musicpackage selection in an electronic device according to an embodiment ofthe present disclosure;

FIG. 8 is a flowchart of a method of an electronic device according toan embodiment of the present disclosure;

FIG. 9 is a flowchart of a method of accompaniment generation in anelectronic device according to an embodiment of the present disclosure;

FIG. 10 is a flowchart of a method of melody generation based on usergesture input in an electronic device according to an embodiment of thepresent disclosure; and

FIG. 11 is a flowchart of a method of an electronic device according toan embodiment of the present disclosure.

DETAILED DESCRIPTION OF EMBODIMENTS OF THE PRESENT DISCLOSURE

The following detailed description is made with reference to theaccompanying drawings and is provided to aid in understanding thepresent disclosure. The present disclosure includes various details toassist in that understanding but these are to be regarded as merelyexamples. Accordingly, those of ordinary skill in the art will recognizethat various changes and modifications of the various exampleembodiments described herein may be made without departing from thescope and spirit of the present disclosure as defined by the appendedclaims and their equivalents. In addition, descriptions of well-knownfunctions and constructions may be omitted for clarity and conciseness.

The terms used in the following detailed description and claims are notlimited to their dictionary meanings, but may simply be used to enable aclear and consistent understanding of the present disclosure.Accordingly, it is intended that the following description of variousembodiments of the present disclosure is provided for illustrationpurposes only and not for the purpose of limiting the present disclosureas defined by the appended claims and their equivalents.

It is intended that the singular forms “a,” “an,” and “the” includeplural referents unless the context clearly dictates otherwise. Thus,for example, reference to “a component surface” includes reference toone or more of such surfaces.

The term “substantially” may generally refer to a recitedcharacteristic, parameter, or value that need not be achieved exactly,but that deviations or variations, including for example, tolerances,measurement error, measurement accuracy limitations and other factorsknown to those of ordinary skill in the art, may occur in amounts thatdo not preclude the effect the characteristic was intended to provide.

The expressions “include” and “may include” which may be used in thepresent disclosure may refer, for example, to the presence of disclosedfunctions, operations, and elements but are not intended to limit one ormore additional functions, operations, and elements. In the presentdisclosure, the terms “include” and/or “have” may be understood torefer, for example, to a certain characteristic, number, operation,element, component or a combination thereof, but are not intended to beconstrued to exclude the existence of or a possibility of addition ofone or more other characteristics, numbers, operations, elements,components or combinations thereof.

Furthermore, in the present disclosure, the expression “and/or” includesany and all combinations of the associated listed words. For example,the expression “A and/or B” may include A, B, or both A and B.

In an embodiment of the present disclosure, expressions includingordinal numbers, such as “first” and “second,” and the like, may modifyvarious elements. However, such elements are not limited by the aboveexpressions. For example, the above expressions do not limit thesequence and/or importance of the elements. The above expressions areused merely to distinguish an element from other elements. For example,a first user device and a second user device may indicate different userdevices, but both of them are user devices. For example, a first elementmay be referred to as a second element, and similarly, a second elementmay be also be referred to as a first element without departing from thescope of the present disclosure.

In a case where a component is referred to as being “connected” to or“accessed” by another component, it is intended that not only thecomponent is directly connected to or accessed by the other component,but also there may exist another component between them. In addition, ina case where a component is referred to as being “directly connected” toor “directly accessed” by another component, it is intended that thereis no component therebetween.

An electronic device according to the present disclosure may be a deviceincluding a communication function. For example, and without limitation,the device may correspond to a combination of at least one of asmartphone, a tablet personal computer (PC), a mobile phone, a videophone, an electronic-book (e-book) reader, a desktop PC, a laptop PC, anetbook computer, a personal digital assistant (PDA), a portablemultimedia player (PMP), a digital audio player, a mobile medicaldevice, an electronic bracelet, an electronic necklace, an electronicaccessory, a camera, a wearable device, an electronic clock, a wristwatch, home appliances (for example, an air-conditioner, a vacuum, anoven, a microwave, a washing machine, an air cleaner, and the like), anartificial intelligence robot, a television (TV), a digital versatiledisc (DVD) player, an audio device, various medical devices (forexample, a magnetic resonance angiography (MRA) device, a magneticresonance imaging (MRI) device, a computed tomography (CT) device, ascanning machine, an ultrasonic wave device, and the like), a navigationdevice, a global positioning system (GPS) a receiver, an event datarecorder (EDR), a flight data recorder (FDR), a set-top box, a TV box(for example, Samsung HomeSync®, Apple TV®, or Google TV™), anelectronic dictionary, vehicle infotainment device, an electronicequipment for a ship (for example, navigation equipment for a ship,gyrocompass, and the like), avionics, a security device, electronicclothes, an electronic key, a camcorder, game consoles, a head-mounteddisplay (HMD), a flat panel display device, an electronic frame, anelectronic album, furniture or a portion of a building/structure thatincludes a communication function, an electronic board, an electronicsignature receiving device, a projector, or the like. It will beapparent to those skilled in the art that an electronic device accordingto the present disclosure is not limited to the aforementioned devices.

FIG. 1 is a block diagram of an electronic device 101 in a networkenvironment 100 according to an embodiment of the present disclosure.

Referring to FIG. 1, the electronic device 101 may include a bus 110, aprocessor (e.g., including processing circuitry) 120, a memory 130, aninput/output interface (e.g., including interface circuitry) 150, adisplay 160, a communication interface (e.g., including communicationcircuitry) 170, and other similar and/or suitable components.

The bus 110 may be a circuit which interconnects the above-describedelements and delivers a communication (e.g., a control message) betweenthe above-described elements.

The processor 120 may include various processing circuitry and receivecommands from the above-described other elements (e.g., the memory 130,the input/output interface 150, the display 160, the communicationinterface 170, and the like) through the bus 110, interpret the receivedcommands, and execute a calculation or process data according to theinterpreted commands. Although illustrated as one element, the processor120 may include multiple processors and/or cores without departing fromthe scope and spirit of the present disclosure. The processor 120 mayinclude various processing circuitry, including a microprocessor or anysuitable type of processing circuitry, such as, for example, and withoutlimitation, one or more central processing units (CPUs), general-purposeprocessors (e.g., advanced reduced instruction set (RISC) machine (ARM)based processors), a digital signal processor (DSP), a programmablelogic device (PLD), an application-specific integrated circuit (ASIC), afield-programmable gate array (FPGA), a graphics processing unit (GPU),a video card controller, etc. Any of the functions and steps provided inthe accompanying drawings may be implemented in hardware, software or acombination of both and may be performed in whole or in part within theprogrammed instructions of a computer. In addition, one of ordinaryskill in the art may understand and appreciate that a processor or amicroprocessor may be hardware in the present disclosure.

The memory 130 may store commands or data received from the processor120 or other elements (e.g., the input/output interface 150, the display160, the communication interface 170, and the like) or generated by theprocessor 120 or the other elements. The memory 130 may includeprogramming modules 140, such as a kernel 141, middleware 143, anapplication programming interface (API) 145, an application 147, and thelike. Each of the above-described programming modules may be implementedin software, firmware, hardware, or a combination of two or morethereof.

The kernel 141 may control or manage system resources (e.g., the bus110, the processor 120, the memory 130, and the like) used to executeoperations or functions implemented by other programming modules (e.g.,the middleware 143, the API 145, and the application 147). In addition,the kernel 141 may provide an interface capable of accessing andcontrolling or managing the individual elements of the electronic device101 by using the middleware 143, the API 145, or the application 147.

The middleware 143 may serve to go between the API 145 or theapplication 147 and the kernel 141 in such a manner that the API 145 orthe application 147 communicates with the kernel 141 and exchanges datatherewith. In addition, in relation to work requests received from theapplication 147 and/or the middleware 143, for example, may perform loadbalancing of the work requests by using a method of assigning apriority, in which system resources (e.g., the bus 110, the processor120, the memory 130, and the like) of the electronic device 101 can beused, to the application 147.

The API 145 is an interface through which the application 147 is capableof controlling a function provided by the kernel 141 or the middleware143, and may include, for example, at least one interface or functionfor file control, window control, image processing, character control,and the like.

The input/output interface 150 may include various interface circuitryand, for example, may receive a command or data as input from a user,and may deliver the received command or data to the processor 120 or thememory 130 through the bus 110. The display 160 may display a video, animage, data, and the like, to the user.

The communication interface 170 may include various communicationcircuitry and connect communication between electronic devices 102 and104 and the electronic device 101. The communication interface 170 maysupport a short-range communication protocol (e.g., wireless fidelity(Wi-Fi), Bluetooth (BT), and near field communication (NFC)), or anetwork communication (e.g., the internet, a local area network (LAN), awide area network (WAN), a telecommunication network, a cellularnetwork, a satellite network, a plain old telephone service (POTS), andthe like). Each of the electronic devices 102 and 104 may be a devicewhich is identical (e.g., is of an identical type) to or different(e.g., is of a different type) from the electronic device 101. Further,the communication interface 170 may enable communication between aserver 106 and the electronic device 101 via a network 162.Additionally, the communication interface 170 may establish ashort-range wireless communication connection 164 between the electronicdevice 101 and any other electronic device (e.g., electronic device102).

FIG. 2 is a block diagram of an electronic device 201 according to anembodiment of the present disclosure.

Referring to FIG. 2, the electronic device 201 may include a processor(e.g., and application processor (AP) including processing circuitry)210, a subscriber identification module (SIM) card 224, a memory 230, acommunication module (e.g., including communication circuitry) 220, asensor module 240, an input device (e.g., including input circuitry)250, a display 260, an interface (e.g., including interface circuitry)270, an audio module (e.g., including a coder/decoder (codec)) 280, acamera module 291, a power management module 295, a battery 296, anindicator 297, a motor 298 and any other similar and/or suitablecomponents.

The processor 210 may include various processing circuitry, such as, forexample, and without limitation, one or more of a dedicated processor, aCPU, APs, and one or more communication processors (CPs). The processor210 may be, for example, the processor 120 illustrated in FIG. 1. The APand the CP may be included in the processor 210 in FIG. 2, or may beincluded in different integrated circuit (IC) packages, respectively.According to an embodiment of the present disclosure, the AP and the CPmay be included in one IC package.

The AP may execute an operating system (OS) or an application program,and thereby may control multiple hardware or software elements connectedto the AP and may perform processing of and arithmetic operations onvarious data including multimedia data. The AP may be implemented by,for example, a system on chip (SoC). According to an embodiment of thepresent disclosure, the processor 210 may further include a GPU.

The CP may manage a data line and may convert a communication protocolin the case of communication between the electronic device (e.g., theelectronic device 101) including the electronic device 201 and differentelectronic devices connected to the electronic device through thenetwork. The CP may be implemented by, for example, an SoC. According toan embodiment of the present disclosure, the CP may perform at leastsome of multimedia control functions. The CP, for example, maydistinguish and authenticate a terminal in a communication network usinga SIM (e.g., the SIM 224). In addition, the CP may provide a user withservices, such as a voice telephony call, a video telephony call, a textmessage, packet data, and the like.

Further, the CP may control the transmission and reception of data bythe communication module 220. In FIG. 2, the elements, such as the powermanagement module 295, the memory 230, and the like are illustrated aselements separate from the processor 210. However, according to anembodiment of the present disclosure, the processor 210 may include atleast some of the above-described elements (e.g., the power managementmodule 295).

According to an embodiment of the present disclosure, the AP or the CPmay load, to a volatile memory, a command or data received from at leastone of a non-volatile memory and other elements connected to each of theAP and the CP, and may process the loaded command or data. In addition,the AP or the CP may store, in a non-volatile memory, data received fromor generated by at least one of the other elements.

The SIM 224 may be a card implementing a SIM, and may be inserted into aslot formed in a particular portion of the electronic device 201. TheSIM 224 may include unique identification information (e.g., IC cardidentifier (ICCID)) or subscriber information (e.g., internationalmobile subscriber identity (IMSI)).

The memory 230 may include an internal memory 232 and/or an externalmemory 234. The memory 230 may be, for example, the memory 130illustrated in FIG. 1. The internal memory 232 may include, for example,at least one of a volatile memory (e.g., a dynamic random access memory(DRAM), a static RAM (SRAM), a synchronous dynamic RAM (SDRAM), and thelike), and a non-volatile memory (e.g., a one-time programmable readonly memory (OTPROM), a programmable ROM (PROM), an erasable andprogrammable ROM (EPROM), an electrically erasable and programmable ROM(EEPROM), a mask ROM, a flash ROM, a NOT AND (NAND) flash memory, a NOTOR (NOR) flash memory, and the like). According to an embodiment of thepresent disclosure, the internal memory 232 may be in the form of asolid state drive (SSD). The external memory 234 may further include aflash drive, for example, a compact flash (CF) drive, a secure digital(SD) drive, a micro-SD drive, a mini-SD drive, an extreme digital (xD)drive, a memory stick, and the like.

The communication module 220 may include various communication circuitryincluding, for example, and without limitation, a radio frequency (RF)module 229. The communication module 220 may be, for example, thecommunication interface 170 illustrated in FIG. 1. The communicationmodule 220 may further include various communication circuitryincluding, for example, and without limitation, wireless communicationmodules to enable wireless communication through the RF module 229. Thewireless communication modules may include, for example, and withoutlimitation, a cellular module 221, a Wi-Fi module 223, a BT module 225,a GPS module 227, and an NFC module 228. Additionally or alternatively,the wireless communication modules may further include a networkinterface (e.g., a LAN card), a modulator/demodulator (modem), and thelike for connecting the electronic device 201 to a network (e.g., theinternet, a LAN, a WAN, a telecommunication network, a cellular network,a satellite network, a POTS, and the like).

The communication module 220 may perform data communication with theelectronic devices 102 and 104, and the server 106 through the network162.

The RF module 229 may be used for transmission and reception of data,for example, transmission and reception of RF signals or calledelectronic signals. The RF unit 229 may include, for example, atransceiver, a power amplifier module (PAM), a frequency filter, a lownoise amplifier (LNA), and the like. In addition, the RF module 229 mayfurther include a component for transmitting and receivingelectromagnetic waves in free space in a wireless communication, forexample, a conductor, a conductive wire, and the like.

The sensor module 240 may include, for example, at least one of agesture sensor 240A, a gyro sensor 240B, an barometer (e.g., atmosphericpressure) sensor 240C, a magnetic sensor 240D, an acceleration sensor240E, a grip sensor 240F, a proximity sensor 240G, a red, green and blue(RGB) sensor 240H, a biometric (e.g., bio) sensor 2401, atemperature/humidity sensor 240J, an illumination (e.g., light) sensor240K, and an ultra violet (UV) light sensor 240M. The sensor module 240may measure a physical quantity or detect an operating state of theelectronic device 201, and convert the measured or detected informationinto an electrical signal. Additionally/alternatively, the sensor module240 may include, for example, an electronic nose (E-nose) sensor, anelectromyography (EMG) sensor, an electroencephalogram (EEG) sensor, anelectrocardiogram (ECG) sensor, a fingerprint sensor, and the like. Thesensor module 240 may further include a control circuit for controllingone or more sensors included therein. The sensor module 240 may also, orin the alternative, be controlled by the processor 210.

The input device 250 may include various input circuitry, such as, forexample, and without limitation, a touch panel 252, a pen sensor 254(e.g., a digital pen sensor), a key 256, and an ultrasonic input device258. The input device 250 may be, for example, the input/outputinterface 150 illustrated in FIG. 1. The touch panel 252 may recognize atouch input in at least one of, for example, a capacitive scheme, aresistive scheme, an infrared scheme, and an acoustic wave scheme. Inaddition, the touch panel 252 may further include a controller. In thecapacitive type, the touch panel 252 is capable of recognizing aproximity touch as well as a direct touch. The touch panel 252 mayfurther include a tactile layer. In this event, the touch panel 252 mayprovide a tactile response to a user.

The pen sensor 254 (e.g., a digital pen sensor), for example, may beimplemented by using a method identical or similar to a method ofreceiving a touch input from a user, or by using a separate sheet forrecognition. For example, a key pad or a touch key may be used as thekey 256. The ultrasonic input device 258 enables the electronic device201 to detect a sound wave by using a microphone 288 of the electronicdevice 201 through a pen generating an ultrasonic signal, and identifydata. The ultrasonic input device 258 is capable of wirelessrecognition. According to an embodiment of the present disclosure, theelectronic device 201 may receive a user input from an external device(e.g., a network, a computer, or a server), which is connected to theelectronic device 201, through the communication module 220.

The display 260 may include a panel 262, a hologram 264, and a projector266. The panel 262 may be, for example, a liquid crystal display (LCD)and an active matrix organic light emitting diode (AM-OLED) display, orthe like, but is not limited thereto. The panel 262 may be implementedso as to be, for example, flexible, transparent, or wearable. The panel262 may include the touch panel 252 and one module. The hologram 264 maydisplay a three-dimensional image in the air by using interference oflight. The projector 266 may include light-projecting elements, such asLEDs, to project light onto external surfaces. According to anembodiment of the present disclosure, the display 260 may furtherinclude a control circuit for controlling the panel 262, the hologram264, or the projector 266.

The interface 270 may include various interface circuitry, such as, forexample, and without limitation, a high-definition multimedia interface(HDMI) 272, a universal serial bus (USB) 274, an optical interface 276,and a d-subminiature (D-sub) connector 278. Additionally oralternatively, the interface 270 may include, for example, anSD/multi-media card (MMC) or an interface according to a standard of theInfrared Data Association (IrDA).

The audio module (e.g., including a codec) 280 may bidirectionallyconvert between an audio signal (e.g., a voice signal) and an electricalsignal. The audio module 280 may convert voice information, which isinput to or output from the audio module 280 through, for example, aspeaker 282, a receiver 284, an earphone 286, the microphone 288, andthe like.

The camera module 291 may capture a still image and a moving image.According to an embodiment of the present disclosure, the camera module291 may include one or more image sensors (e.g., a front lens or a backlens), an image signal processor (ISP), and a flash LED.

The power management module 295 may manage power of the electronicdevice 201. The power management module 295 may include, for example, apower management IC (PMIC), a charger IC, or a battery gauge. The PMICmay be mounted to, for example, an IC or an SoC semiconductor. Chargingmethods may be classified into a wired charging method and a wirelesscharging method. A charger IC may charge a battery, and prevent anovervoltage or an overcurrent between a charger and the battery.According to an embodiment of the present disclosure, the charger IC mayprovide at least one of a wired charging method and a wireless chargingmethod. Examples of a wireless charging method may include a magneticresonance method, a magnetic induction method, an electromagneticmethod, and the like. Additional circuits (e.g., a coil loop, aresonance circuit, a rectifier, and the like) for wireless charging maybe added in order to perform wireless charging. The battery gauge maymeasure, for example, a residual quantity of the battery 296, a voltage,a current or a temperature during charging. The battery 296 may supplypower by generating electricity, and may be, for example, a rechargeablebattery.

The indicator 297 may indicate particular states of the electronicdevice 201 or a part of the electronic device 201 (e.g., the AP), forexample, a booting state, a message state, a charging state and thelike. The motor 298 may convert an electrical signal into a mechanicalvibration.

The electronic device 201 may include a processing unit (e.g., a GPU)for supporting a module TV. The processing unit for supporting a moduleTV may process media data according to standards, such as, for example,digital multimedia broadcasting (DMB), digital video broadcasting (DVB),MediaFlow®, and the like.

Each of the above-described elements of the electronic device 201according to an embodiment of the present disclosure may include one ormore components, and the names of the elements may change depending onthe type of the electronic device 201. The electronic device 201 mayinclude at least one of the above-described elements. Some of theabove-described elements may be omitted from the electronic device 201,or the electronic device 201 may further include additional elements. Inaddition, some of the elements of the electronic device 201 may becombined into one entity, which may perform functions identical to thoseof the relevant elements before the combination.

The term “module” used in the present disclosure may refer to, forexample, a unit including one or more combinations of hardware,software, and firmware. The term “module” may be interchangeably usedwith the terms “unit,” “logic,” “logical block,” “component,” “circuit,”and the like. The term “module” may indicate a minimum unit of acomponent formed as one body or a part thereof. The term “module” mayindicate a minimum unit for performing one or more functions or a partthereof. The term “module” may indicate a unit that is implementedmechanically or electronically. For example, and without limitation, theterm “module” according to an embodiment of the present disclosure mayrefer to a unit that includes at least one of a dedicated processor, aCPU, an ASIC, an FPGA, and a programmable-logic device for performingcertain operations which are known or will be developed in the future.

FIG. 3 is a block diagram of an electronic device (e.g., a programmingmodule 310) according to an embodiment of the present disclosure.

Referring to FIG. 3, the programming module 310 may be included (orstored) in the electronic device 101 (e.g., in the memory 130) in FIG. 1or may be included (or stored) in the electronic device 201 (e.g., inthe memory 230) illustrated in FIG. 2. At least a part of theprogramming module 310 may be implemented in software, firmware,hardware, or a combination of two or more thereof. The programmingmodule 310 may be implemented in hardware, and may include an OScontrolling resources related to an electronic device and/or variousapplications (e.g., applications 370) executed in the OS. For example,an OS may be Android®, iOS®, Windows®, Symbian®, Tizen®, Bada™, and thelike.

The programming module 310 may include a kernel 320, a middleware 330,an API 360, and/or applications 370. The kernel 320 may include a systemresource manager 321 and/or a device driver 323. The system resourcemanager 321 may include, for example, a process manager, a memorymanager, and a file system manager. The system resource manager 321 mayperform control, allocation, recovery, and the like of system resources.The device driver 323 may include, for example, a display driver, acamera driver, a BT driver, a shared memory driver, a USB driver, akeypad driver, a Wi-Fi driver, and/or an audio driver. In addition,according to an embodiment of the present disclosure, the device driver323 may include an inter-process communication (IPC) driver.

The middleware 330 may include multiple modules previously implementedso as to provide a function used in common by the applications 370. Inaddition, the middleware 330 may provide a function to the applications370 through the API 360 in order to enable the applications 370 toefficiently use limited system resources within an electronic device.For example, the middleware 330 may include at least one of a runtimelibrary 335, an application manager 341, a window manager 342, amultimedia manager 343, a resource manager 344, a power manager 345, adatabase manager 346, a package manager 347, a connection manager 348, anotification manager 349, a location manager 350, a graphic manager 351,a security manager 352, and any other suitable and/or similar manager.

The runtime library 335 may include, for example, a library module usedby a complier in order to add a new function by using a programminglanguage during execution of the applications 370. According to anembodiment of the present disclosure, the runtime library 335 mayperform functions which are related to input and output, the managementof a memory, an arithmetic function, and the like.

The application manager 341 may manage, for example, a life cycle of atleast one of the applications 370. The window manager 342 may managegraphical user interface (GUI) resources used on the screen. Themultimedia manager 343 may detect a format used to reproduce variousmedia files and may encode or decode a media file through a codecappropriate for the relevant format. The resource manager 344 may manageresources, such as source code, a memory, a storage space, and the likeof the applications 370.

The power manager 345 may operate with a basic input/output system(BIOS), manage a battery or power, and provide power information and thelike used for an operation. The database manager 346 may manage adatabase in such a manner as to enable the generation, search and/orchange of a database to be used by the applications 370. The packagemanager 347 may manage the installation and/or update of an applicationdistributed in the form of a package file.

The connection manager 348 may manage wireless connectivity, such as,for example, Wi-Fi and BT. The notification manager 349 may display orreport, to a user, an event, such as an arrival message, an appointment,a proximity alarm, and the like in such a manner as not to disturb theuser. The location manager 350 may manage location information of anelectronic device. The graphic manager 351 may manage a graphic effectwhich is to be provided to the user and/or a user interface related tothe graphic effect. The security manager 352 may provide varioussecurity functions used for system security, user authentication, andthe like. According to an embodiment of the present disclosure, when anelectronic device has a telephone function, the middleware 330 mayfurther include a telephony manager for managing a voice telephony callfunction and/or a video telephony call function of the electronicdevice.

The middleware 330 may generate and use a new middleware module throughvarious functional combinations of the above-described internal modules.The middleware 330 may provide modules specialized according to types ofOSs in order to provide differentiated functions. In addition, themiddleware 330 may dynamically delete some of the existing elements, ormay add new elements. Accordingly, the middleware 330 may omit some ofthe elements described in the various embodiments of the presentdisclosure, further include other elements, or replace some of theelements with other elements, each of which performs a similar functionbut has a different name.

The API 360 is a set of API programming functions, and may be providedwith a different configuration according to an OS. In the case ofAndroid® or iOS®, for example, one API set may be provided to eachplatform. In the case of Tizen®, for example, two or more API sets maybe provided to each platform.

The applications 370 may include, for example, a preloaded applicationand/or a third party application. The applications 370 may include, forexample, a home application 371, a dialer application 372, a shortmessage service (SMS)/multimedia message service (MMS) application 373,an instant message (IM) application 374, a browser application 375, acamera application 376, an alarm application 377, a contact application378, a voice dial application 379, an electronic mail (e-mail)application 380, a calendar application 381, a media player application382, an album application 383, a clock application 384, and any othersuitable and/or similar application.

At least a part of the programming module 310 may be implemented byinstructions stored in a non-transitory computer-readable storagemedium. When the instructions are executed by one or more processors(e.g., the processor 210), the one or more processors may performfunctions corresponding to the instructions. The non-transitorycomputer-readable storage medium may be, for example, the memory 230. Atleast a part of the programming module 300 may be implemented (e.g.,executed) by, for example, the processor 210. At least a part of theprogramming module 300 may include, for example, a module, a program, aroutine, a set of instructions, and/or a process for performing one ormore functions.

Names of the elements of the programming module 310 may change dependingon the type of OS. The programming module according to an embodiment ofthe present disclosure may include one or more of the above-describedelements. Alternatively, some of the above-described to elements may beomitted from the programming module. Alternatively, the programmingmodule may further include additional elements. The operations performedby the programming module or other elements according to an embodimentof the present disclosure may be processed in a sequential method, aparallel method, a repetitive method, or a heuristic method. Inaddition, some of the operations may be omitted, or other operations maybe added to the operations.

FIG. 4 is a block diagram of an electronic device 400 according to anembodiment of the present disclosure.

Referring to FIG. 4, the electronic device 400 may include a display410, a processor 420, and a sensor.

The display 410 may receive user input. In an embodiment of the presentdisclosure, a user input may include a gesture input or a drawing input.A gesture input may refer to a user input proximate to the display 410or a user input on the display 410. A drawing input may refer to aninput made by a user who draws a line or model using the user's hand oran input tool (e.g. a touch pen or a mouse). To generate an audio file,a user may enter a drawing on the display 410. Audio generation isdescribed in greater detail below with reference to the processor 420.

To receive a drawing input from a user, the display 410 may beimplemented as a combination of a touch panel capable of receiving adrawing input and a display panel. In one embodiment of the presentdisclosure, to receive a drawing input using a pen, the display 410 mayfurther include a panel capable of recognizing a pen touch. In anembodiment of the present disclosure, to recognize pressure caused by adrawing input, the display 410 may further include a panel implementinga pressure sensor.

The display 410 may display a screen (e.g. FIGS. 7A to 7C) that allows auser to enter a drawing input and select a music package.

The electronic device 400 may further include a sensor. The sensor maysense a gesture input from a user. The sensor may be not separatelyimplemented but may be incorporated into the display 410 so that thedisplay 410 may receive a gesture input from a user.

The processor 420 may identify characteristics of a music package inresponse to a user input for selecting the music package. The musicpackage may include a first audio used for audio generation, informationon types of musical instruments used to generate the first audio, statusinformation on the musical instruments, and a list of sections of thefirst audio. A section can indicate a largest unit of a piece of music.For example, one piece of music may include an introduction, a refrain,and the like; and the introduction and the refrain may each form asection. A phrase may include a plurality of motifs. A motif may be asmallest meaningful unit of a piece of music. In an embodiment of thepresent disclosure, an electronic device may generate a single motifusing drawing input. A generated motif may be modified on a basis of acharacteristics of a drawing input and characteristics of a musicpackage, and the processor 420 may generate a main melody (e.g., asecond audio) of music by using the generated and modified motifs. Thisis described below in greater detail.

A user may enter a drawing input on the display 410, and the drawinginput may be used as an input to produce a piece of music contained inan audio file in whole or in sections. As described above, the display410 may visually present a drawing input entered by a user.

The processor 420 may identify characteristics of a first audiocontained in a music package selected by a user and characteristics of adrawing input.

In an embodiment of the present disclosure, characteristics of a drawinginput may be identified by four layers. The four layers may include acanvas layer, a motif layer, a history layer, and an area layer.

The canvas layer may be a layer that stores information on drawingscontained in a drawing input.

The motif layer may be a layer that stores information on an order inwhich drawings are input by a drawing input and a position of eachdrawing drawn on the canvas layer.

The history layer may be a layer that stores information regarding anorder in which lines included in each drawing are drawn, a speed atwhich each line is drawn, a position of each line drawn on the canvaslayer, and a process in which each drawing is created.

The area layer may be a layer that stores information regarding an areaof the canvas layer occupied by each drawing included in a drawinginput, and a point (or area) created by an intersection of drawingsincluded in the drawing input. In an embodiment of the presentdisclosure, while receiving a drawing input from a user, the processor420 may generate the four layers to analyze the drawing input.

In an embodiment of the present disclosure, the processor 420 mayidentify characteristics of a first audio included in a music package. Amusic package may be a file containing information needed by an audiofile corresponding to a music composition and composed music. In otherwords, a music package may refer to a file that contains first audiodata corresponding to audio of an audio file and data related tocharacteristics of a first audio. A music package may also include a tagassociated with characteristics of a first audio. The processor 420 maycontrol the display 410 to display a screen enabling one or more tags tobe selected. A user may select a tag from a tag selection screendisplayed on the display 410, and generate an audio file using a musicpackage corresponding to the selected tag. This is described below ingreater detail with reference to FIGS. 7A to 7C.

For example, characteristics of a first audio may include types ofsections (e.g. an introduction, a refrain) of the first audio,characteristics of each section (e.g. a length, a tone, sound effects,meter (bpm)), an order of the sections, a melody applicability to eachsection (e.g. a melody that may be generated by a drawing input of auser may not be applied to an introduction, but a melody that may begenerated by a drawing input of a user may be applied to a refrain), andchord scale information.

A chord scale corresponding to a first audio may refer to a group ofchord scales that may be applied to a second audio generated by adrawing input. In an embodiment of the present disclosure, a chord scalemay be assigned to each section included in a first audio. A chord scalemay include information regarding progress, characteristics, and apurpose of a chord (i.e. for brightening a mood of a song or fordarkening the mood of the song, etc.).

In an embodiment of the present disclosure, the processor 420 maygenerate a second audio by applying one of chords included in a chordcandidate group to melody data generated by a drawing input. In thiscase, the second audio may indicate a main melody of a section (orphrase, motif) to which the second audio is applied. Melody data isdescribed below is greater detail.

The processor 420 may extract a motif based on characteristics of adrawing input identified using the four layers. For example, a motif maybe generated on a basis of an order of drawings contained in the motiflayer among the four layers, and positions of drawings on the canvaslayer. On the canvas layer shown in FIG. 6A, there are points 611 to 616on a drawing 610. On the canvas layer, the y-axis value rises from theinitial point 611 via the point 612 to the point 613, decreases sharplyfrom the point 613 to the point 614, and increases from the point 614via the point 615 to the point 616. In this case, a motif generated bysuch a drawing may indicate the following information with respect topitch. That is, the pitch rises in the interval from the point 611 tothe point 613 where the y-axis value increases; the pitch falls in theinterval from the point 613 to the point 614; and the pitch rises againin the interval from the point 164 to the point 616. In an embodiment ofthe present disclosure, a motif may include information about changes inpitch corresponding to a drawing input.

The processor 420 may identify characteristics of a drawing inputthrough the area layer among the four layers. For example, the processor420 may identify an area of the canvas layer occupied by drawingscontained in the area layer.

The processor 420 may identify characteristics of elements (e.g. lines)included in a drawing using the history layer among the four layers. Forexample, the processor 420 may check a process of making a drawing, anorder of lines included in the drawing, a position of the lines locatedon the motif layer, a slope (or velocity) of the lines, and a time takento make the drawing. In an embodiment of the present disclosure, theprocessor 420 may modify a motif extracted from the motif layer on abasis of characteristic information of elements included in a drawinginput and a drawing extracted from the area layer and/or the historylayer.

When the display 410 includes a pressure sensor capable of sensingpressure, the processor 420 may modify a motif extracted from the motiflayer based on the sensed pressure.

Below a description is given in greater detail of modification of amotif and generation of melody data using the modified motif.

The processor 420 may determine a length (or a time) of a second audio(which may be generated by melody data) to be generated using a motifextracted from the motif layer. The processor 420 may determine a lengthof melody data based on characteristics of a first audio. The processor420 may develop a motif up to a determined length of a second audio. Forexample, when a length of a motif is 4 and a length of a second audio is16, the processor 420 may generate melody data with a total length of 16on a basis of a first motif generated using the motif layer and a secondmotif generated by modulating the first motif using the history layer orthe area layer.

The processor 420 may modify a motif based on an area of a drawingextracted from the area layer. In an embodiment of the presentdisclosure, the processor 420 may determine a complexity of a motifmodulation depending on an area of a drawing. As a complexity of a motifmodulation increases, a degree of repetition of a motif may decrease;and as the complexity of the motif modulation decreases, the degree ofrepetition of similar motifs may increase. For example, the processor420 may determine a complexity of a motif modulation in proportion to anarea of a drawing.

The processor 420 may modify a motif by using velocity information oflines included in a drawing extracted from the history layer in a mannerthat changes a rhythm. FIG. 6D illustrates a velocity table 640 of adrawing 610 for which a drawing velocity is mapped. The processor 420may use the velocity table 640 to extract an average velocity and amaximum velocity at which the drawing 610 is drawn. The velocity table640, includes velocity information for a portion corresponding to thedrawing 610. In one embodiment of the present disclosure, the processor420 may apply a delay effect among sound effects to a portioncorresponding to the motif 610 among melody data on a basis of anaverage velocity extracted from the velocity table 640. The processor420 may also apply sound effects to push a sound to a portioncorresponding to the motif 610 among melody data on a basis of a maximumvelocity extracted from the velocity table.

For example, if a velocity at which a line is drawn exceeds a presetvalue, a motif can be modified using another rhythm. In an embodiment ofthe present disclosure, if a velocity exceeds a preset value, theprocessor 420 may modify a rhythm corresponding to a motif. In addition,if a velocity is below a preset value, the processor 420 may modify apitch corresponding to a motif.

The processor 420 may change a tone of a motif using slope informationof a line extracted from the history layer. A tone may indicate asensory feature resulting from a difference in sound components. A tonemay also be changed by modifying a frequency of a sound.

The processor 420 may change a pitch included in a motif on a basis of adirection and length information of a line extracted from the historylayer. A motif may include a relative difference between notes includedin the motif. The processor 420 may modify a motif by adjusting arelative difference between notes included in the motif based on adirection and length of a line.

The processor 420 may modify a motif based on an order of drawing inputextracted from the history layer. In FIG. 6B, a drawing input includesthree lines. It is possible to determine which of the three linesincluded in the drawing input is most significant for motif modificationin consideration of an input order of the lines. For example, a featurecorresponding to the most recently drawn line 623 may be moresignificant for modifying a motif than a feature corresponding to theother lines 621 and 622.

In an embodiment of the present disclosure, the processor 420 may modifya motif generated using the motif layer based on three layers reflectingcharacteristics of a drawing input. FIG. 6C illustrates a motif 610created using the motif layer and modified motifs 631 and 632. Theprocessor 420 may generate modified motifs 631 and 632 in considerationof characteristics of the motif 610. The modified motifs 631 and 632 canbe used for phrase generation and section generation.

In an embodiment of the present disclosure, the processor 420 maycombine modified and existing motifs (motif development) to generate aphrase, and may combine generated phrases to generate a section. Theprocessor 420 may combine generated sections to generate one piece ofmelody data.

The processor 420 may extract positions of lines and intersectioncomponents generated by intersecting lines from the area layer to addchords to melody data.

Various techniques may be used for generating a phrase by modifying apitch corresponding to a motif and developing the motif. Table 1 belowdescribes techniques for motif development by using a motif modifiedthrough pitch modification.

TABLE 1 Pitch modification Modification technique Repetition Motifdevelopment by repeating a pitch Inversion Motif development byinverting a motif with respect to a median of pitches contained in themotif Sequence Change all pitch values included in a motif TranspositionChange an order of pitches included in a motif

Various techniques may be used for generating a phrase by modifying arhythm corresponding to a motif and developing the motif. Table 2 belowdescribes techniques for motif development by using a motif modifiedthrough rhythm modification.

TABLE 2 Rhythm modification Modification technique Retrograde Motifdevelopment by reversing an order of progression of a total rhythmInversion Reverse a rhythm shape with respect to a mid-time of a wholerhythm (e.g. rhythm “A + B” is changed to “B + A”) Augmentation Increasea duration of a rhythm Diminution Reduce a duration of a rhythm

The processor 420 may combine generated phrases to create a section(section building). In an embodiment of the present disclosure, agenerated motif may be combined with a motif modified based oncharacteristics of drawings to generate a phrase; and the generatedphrase may be combined with a modified phrase to build a section. Theremay be various ways to create a section. Table 3 below describes sometechniques for section building.

TABLE 3 Section building Modification Symmetric Technique usable for asection including an even number of phrases (implementable in ABABformat) Asymmetric Technique usable for a section including an oddnumber of phrases (implementable in ABAA format)

The processor 420 may combine sections generated through sectionbuilding to generate melody data. While a second audio includes absolutepitch values of a main melody (e.g. a main melody may includeinformation such as Do, Mi, and Sol) corresponding to a drawing input ofa user, melody data may include relative pitch values of a second audio(for example, information indicating that, for a melody with threenotes, a second note is two tones higher than a first note, and a thirdnote is four tones higher than the first note).

In an embodiment of the present disclosure, melody data may includeinformation regarding relative pitch values in the melody data, a startpoint of sound, a length of sound (rhythm), an intensity of sound(velocity), tone colors, and sound effects. Sound effect information mayinclude information regarding types of sound effects (e.g. delay,chorus, reverb, filter, or distortion), start points of sound effects,coverage, and setting values. For example, sound effects may begenerated in consideration of not only characteristics of a drawinginput but also characteristics of a first audio included in a musicpackage. Table 4 below lists elements used to generate melody data andtheir results.

TABLE 4 Input elements Used elements and results Features Drawing y-axisModify a pitch of a information drawing Drawing x-axis Modify a tempo ofa second audio by input information changing a beat and a time Averagedrawing velocity Generate a feeling of a slowing sound by adjusting adelay element among sound effects Maximum drawing Generate a feeling ofsound being velocity pushed by adjusting a delay effect and feedbackamong sound effects Drawing process Control complexity of a melody linecomplexity by adjusting a complexity of the melody line Drawingintensity Produce a stereoscopic feeling for a second audio by adjustingdynamics of the second audio Features Hash tag of music package Match abrightness of a second audio of a first (light or dark feeling) with abrightness of a first audio audio Hash tag of music package Apply genrecharacteristics of a first (swing) audio to a second audio Hash tag ofmusic package Set a length of a second audio to a (song length) lengthof a first audio Section selection of music Apply a harmony of a firstaudio to a package harmony of a second audio

In an embodiment of the present disclosure, the processor 420 may modifya motif in consideration of characteristics of a first audio included ina music package as well as characteristics of a drawing input, and mayadd a sound effect to a motif in consideration of the characteristics ofthe first audio included in the music package.

Processor 420 may determine a chord scale of a first audio included in amusic package. As described above, a chord scale may refer to a group ofcandidate chords applicable to melody data. The processor 420 may usechord scale information to determine an optimal chord to be applied tomelody data. For example, the processor 420 may determine a chord, amongchords included in a chord scale, corresponding to values of a rhythmsuch as a length, a height, and a slope included in melody data. Chordscale information may be included in a music package, but the processor420 may determine the chord scale information by analyzing a firstaudio.

For example, the processor 420 may determine a chord to be applied tomelody data among chords of a chord scale and may change relative pitchvalues contained in the melody data to absolute pitch values. Forexample, melody data with three notes may have relative information thata second note is two tones higher than a first note and a third note isfour tones higher than the first note. The processor 420 may apply adetermined chord to melody data to generate a second audio in which afirst note is Do, a second note is Mi, and a third note is Sol. In anembodiment of the present disclosure, the electronic device 400 maygenerate an audio file by combining a second audio generated based on adrawing input with a first audio included in a music package.

In an embodiment of the present disclosure, the processor 420 maydetermine musical instruments matching melody data among a plurality ofmusical instruments used to produce a first audio included in a musicpackage. The processor 420 may combine the first audio played by thedetermined musical instruments with a second audio to generate an audiofile.

In an embodiment of the present disclosure, in a first audio included ina music package, tracks played by individual musical instruments may bepartially modified according to a user selection. A first audiogenerated by combining modified tracks may be combined with a generatedsecond audio to generate an audio file.

In an embodiment of the present disclosure, a first audio played bymusical instruments selected by a user among musical instruments use toproduce the first audio included in a music package may be combined witha generated second audio to generate an audio file. The audio file maybe generated using an extension that an electronic device can support.The audio file may be stored in an editable form, so that anotherelectronic device (e.g. a digital audio workstation (DAW)) can readilyedit the audio file.

In an embodiment of the present disclosure, the electronic device 400may further include a sensor to collect ambient context information. Theambient context information may be collected by a sensor or stored in amemory of an electronic device. For example, the ambient contextinformation may indicate profile information and activity informationincluded in a user's social networking service (SNS) account.

The processor 420 may generate a motif by analyzing ambient contextinformation. For example, a motif can be generated using ambient contextinformation such as a number of steps, a movement speed, and a traveldistance of a user, and local weather of an area where the electronicdevice 400 is located. A motif may also be generated in consideration ofa sound output from the electronic device 400 (e.g., music played by amusic player application). As described above, a motif generated by theprocessor 420 may be used to generate melody data.

In an embodiment of the present disclosure, the processor 420 maydetermine a music package corresponding to ambient context informationamong music packages usable for generating an audio file, and generatemelody data and a second audio using a music package corresponding tothe ambient context information. FIG. 5 is a method of an electronicdevice to generate an audio file according to an embodiment of thepresent disclosure.

Referring to FIG. 5, the method for generating an audio file isdescribed below using a user gesture input and a music package.

The processor 420 may generate melody data 530 in consideration ofcharacteristics of a user gesture input 510 entered by a user on thedisplay 410 and the characteristics of a music package 520 selected bythe user.

The processor 420 may combine a chord scale 540, which is a portion ofcharacteristics of a music package 520 or is generated through analysisof a first audio, with melody data 530 to produce a second audio 550. Inan embodiment of the present disclosure, the melody data 530 hasrelative pitch values of included notes, and the processor 420 uses thechord scale 540 to convert the relative pitch values of the notesincluded in the melody data 530 to absolute pitch values.

The processor 420 may combine a generated second audio 550 with a firstaudio included in a music package 520 to generate an audio file 560.Thereby, the user of the electronic device 400 may easily compose apiece of music whose first audio is music contained in a music package520 using the user gesture input (e.g. drawing input) 510. FIGS. 7A to7E are screen representations depicting music package selection in anelectronic device according to an embodiment of the present disclosure.The following description concerns a scenario where a drawing input isreceived among various examples of a user gesture input.

Referring to FIGS. 7A-7E, the electronic device 400 may display a screenpermitting a user to select a desired genre among a plurality of genreson the display 410. FIG. 7A shows a screen for displaying individualgenres of music. The following description concerns a scenario where auser selected “rock” as a genre.

In response to a genre selection, the display 410 may display tagscorresponding to the selected genre as shown in FIG. 7B. FIG. 7B showsvarious tags corresponding to the selected genre 711. For example, Table5 below illustrates an embodiment of genres and associated tags.

TABLE 5 Genres Tags EDM Energetic Emotional Drama Fresh Fun SadSentimental Tension Mystery Fantasy Chic Powerful Magnificent Dark WhiteMusical Season Dancy Generation Rock K-POP ENERGETIC SHORT BEAT DELAYGUITAR STRING VIVID CALM BRIGHT ELECTRONIC DRUM 70'S ROCK GROOVE

Although some genres and tags correspond to the genres listed in Table 5above, the present disclosure is not limited thereto. The presentdisclosure may utilize a variety of genres, sub-genres, tags, andsub-tags. In FIG. 7B, various tags corresponding to the rock genreselected by the user are presented as circles. In an embodiment of thepresent disclosure, there is no limit to a format in which tags arepresented. As shown in FIG. 7B, each tag may be displayed inside acircle, but each tag may also be displayed using various shapes such asa square and a triangle.

When a user selects a tag “beat delay” 712 while the screen of FIG. 7Bis displayed on the display 410, the processor 420 may display a list ofmusic packages corresponding to the selected genre 711 (rock) and theselected tag 712 on the display 410. FIG. 7C shows a list of musicpackages corresponding to the selected genre 711 and the selected tag712. In an embodiment of the present disclosure, to add a music packagethat is not present in a memory of the electronic device 400, when theuser selects a separate button 716, the processor 420 may control acommunication module to download a music package corresponding to theselected genre 711 and the selected tag 712 from a server. The processor420 may determine a music package corresponding to the genre 711 and theselected tags 712, 713 and 714, and control the display 410 to display alist of music packages corresponding to the genre 711 and the selectedtags 712, 713 and 714. FIG. 7C shows a music package list 715corresponding to the genre 711 and the selected tags 712, 713 and 714.As described above, the electronic device 400 may readily provide a userwith a music package usable for composition. FIG. 7D illustrates adetailed screen of a music package selected from among music packagescorresponding to the genre 711 and the selected tags 712, 713 and 714.Tags may be defined when a music package is created. The processor 420may filter a music package corresponding to a genre and tag selected bya user (a music package may be stored in the electronic device 400 or beprovided by a server).

A selected tag may be used for generation of a second audio. In anembodiment of the present disclosure, the processor 420 may modify amotif in consideration of characteristics of selected tags. This isdescribed in relation to Table 4 above. For example, if a feature of aselected tag is associated with a swing (one of the styles of jazz)feature of a variation, the processor 420 may modify a generated melodydata by applying a swing effect to the generated melody data. Inaddition, the processor 420 may modify a first audio by applying a swingeffect to the first audio.

Features or characteristics corresponding to a music package may bepre-stored in a memory of the electronic device 400. For example,features corresponding to a music package may be stored in a formatshown in Table 6 below.

TABLE 6 Length of first audio Complexity Variation Short (under 1minute) Simple Swing Every part is of complexity ≤3 Medium (under 4minutes) Complicated Too much swing Every part is of complexity ≥5 Long(over 5 minutes) Groove (Velocity) Too much groove (Velocity) Drum shortDrum very short

In an embodiment of the present disclosure, the processor 420 maygenerate an audio file using a music package selected by a user as shownin FIGS. 7A to 7D.

In an embodiment of the present disclosure, the processor 420 may edit amusic package selected by a user and generate an audio file using theedited music package. FIG. 7E shows a screen for supporting editing of afirst audio included in a music package based on a user selection. Asshown in FIG. 7E, the first audio edit support screen may include aregion 721 for displaying a list of sections of the first audio, aregion 722 for displaying a list of sounds selectable in each section, aplay button 723, a repeat button 724, a write button 725, a drawinginput button 726, and a finish button 727. A list of selectable soundsfor each section may indicate alternative sounds. Alternative sounds mayrefer to a set of sounds whose chord progression is identical orsimilar. A user can select one sound from among alternative sounds A, B,C and D. The processor 420 may edit a first audio using a combination ofsounds selected by a user. In response to a user input on a play button723, the processor 420 may control a speaker to reproduce a first audio.In response to a user input on a repeat button 724, the processor 420may control a speaker to reproduce a first audio repeatedly. In responseto a user input on a drawing input button 726, the processor 420 maycontrol the display 410 to display a screen (e.g. FIG. 6A) for modifyinga previously-entered drawing input. In response to an additional userinput on the drawing input button 726, the processor 420 may control thedisplay 410 to display a screen (e.g., FIG. 6A) for supporting separatedrawing input to a selected section. An additional drawing input mayindicate generating an independent second audio for each section ofmusic. For example, a drawing input used for a chorus and a drawinginput used for an introduction may be made different from each other togenerate second audios separately used for the chorus and theintroduction.

After selecting a music package, the processor 420 may control thedisplay 410 to display a screen for receiving a user drawing input. FIG.6A illustrates a screen capable of supporting a user drawing input. InFIG. 6A, the x-axis of a drawing input support screen may indicate beatsand bars included in a motif, and the y-axis may indicate the pitch ofthe motif.

In response to a user input on the first audio edit button 617, theprocessor 420 may control the display 410 to display the screen shown inFIG. 7E. In response to a user input on the play button 618, theprocessor 420 may control a speaker to reproduce a second audio. Inresponse to a user input on the repeat button 619, the processor 420 maycontrol a speaker to reproduce a second audio repeatedly. In response toa user input on the play/non-play selection button 620 for a firstaudio, the processor 420 may control a speaker to reproduce or notreproduce a first audio corresponding to a second audio.

According to an embodiment of the present disclosure, a mobile devicemay include a touch display configured to sense a user input; a memory;and a processor. Upon receiving a user input for generating an audiofile from a touch display, a processor may examine characteristics of auser input and characteristics of a first audio included in first audiodata stored in a memory, generate melody data based on characteristicsof the user input and the characteristics of the first audio, generate asecond audio based on the melody data and chord information included inthe first audio data, and generate the audio file by combining thegenerated second audio with the first audio.

A processor may determine a relative pitch in a motif of a second audiobased on a height of a point on a curve generated by a user input,determine a beat in a motif of a second audio based on a length of thecurve, modify the motif based on characteristics of the user input andcharacteristics of the first audio, and generate melody data based onthe modified motif.

A processor may generate melody data by differentiating sound effects inconsideration of a drawing order and velocity of lines included in auser input.

A processor may determine whether a velocity at which a line is drawn ina user input exceeds a preset value, modify a beat corresponding to amotif if the velocity exceeds the preset value, and modify a pitchcorresponding to the motif if the velocity is less than or equal to thepreset value.

A memory may temporarily or non-temporarily store a music packageincluding a first audio and first audio data. In response to a userinput for selecting a music package, a processor may identify a tag ofthe music package and determine sound effects to be applied to a secondaudio based on the identified tag.

A processor may determine a degree to which a motif is modified based ona size of an area occupied by lines included in a user input.

A processor may generate at least one phrase by combining a generatedmotif with a modified motif of the generated motif, and generate asecond audio by using the at least one phrase.

Melody data may include relative pitch values corresponding respectivelyto notes included in the melody data. A processor may generate a secondaudio by converting relative pitch values corresponding to notesincluded in melody data to absolute pitch values based on a determinedchord.

A processor may identify a chord scale of a first audio based oncharacteristics of the first audio, and generate a second audio byconverting relative pitch values of notes included in melody data toabsolute pitch values based on chord information corresponding to thesecond audio among pieces of chord information belonging to the chordscale.

A mobile device may further include a sensor to collect ambient contextinformation thereof. A processor may select a music package based onambient context information and generate a second audio based on theambient context information and characteristics of a first audioincluded in the music package. FIG. 8 is a flowchart of a method of anelectronic device according to an embodiment of the present disclosure.

Referring to FIG. 8, at step 810, the processor 420 may control thedisplay 410 to display a screen for selecting a music package. Forexample, the processor 420 may output the screen shown in FIGS. 7A to 7Eon the display 410 and may receive a user input for selecting a musicpackage.

At step 820, the processor 420 may receive a user input for selecting amusic package. At step 830, the processor 420 may identifycharacteristics of a first audio included in a music package. Forexample, the processor 420 may identify characteristics of a first audiosuch as a length of the first audio, types of musical instruments usedto produce the first audio, sounds output by musical instruments, and atone, a pitch and a chord scale of the first audio.

At step 840, the processor 420 may receive a user gesture input. At step850, the processor 420 may identify characteristics of the user gestureinput. A user gesture input may include a drawing input. In anembodiment of the present disclosure, the processor 420 may identifycharacteristics of a user gesture input by using four layers.Characteristics of a gesture input may be identified by the four layers.The four layers may include a canvas layer that stores information ondrawings contained in a gesture input, a motif layer that storesinformation on an order in which drawings are input by the gesture inputand a position of each drawing on the canvas layer, a history layer thatstores information regarding the order in which lines included in eachdrawing are drawn, a velocity at which each line is drawn, a position ofeach line drawn on the canvas layer, and a process in which each drawingis created, and an area layer that stores information regarding an areaof the canvas layer occupied by each drawing included in a gestureinput, and a point (or area) created by an intersection of drawingsincluded in the gesture input. In various embodiments, the processor 420may generate the four layers while receiving a gesture input from auser, and identify characteristics of a gesture input based on the fourlayers.

At step 850, the processor 420 may generate melody data based oncharacteristics of a first audio and characteristics of a drawing input.An operation of an electronic device for generating melody data isdescribed below in greater detail with reference to FIG. 10.

At step 860, the processor 420 may generate a second audio by applying achord scale associated with a first audio among characteristics of thefirst audio identified at operation 830 as being associated with melodydata. As described before, melody data includes relative pitch valuesbetween notes included in the melody data. In an embodiment of thepresent disclosure, a method of an electronic device may effectivelygenerate a second audio that may match a first audio by applying a chordscale associated with the first audio to melody data.

At step 870, the processor 420 may combine the first audio and thegenerated second audio to generate an audio file.

In the method of the electronic device described above with reference toFIG. 8, a user gesture input is received after selecting a musicpackage. However, a music package may be selected after receiving a usergesture input. In an embodiment of the present disclosure, uponreceiving a user gesture input, the processor 420 may determinecharacteristics of a user gesture input. The processor 420 may extractat least one music package corresponding to identified characteristicsof a user gesture input and display a list of extracted music packageson the display 410. For example, in FIG. 8, the order of step 810 fordisplaying a screen for selecting a music package and step 840 forreceiving a user gesture input may be changed. FIG. 9 is a flowchart ofa method of first audio generation in an electronic device according toan embodiment of the present disclosure.

Referring to FIG. 9, the description below is of generating a firstaudio that is not equal to a first audio included in a music package.

At step 910, the processor 420 may control the display 410 to display ascreen for selecting a music package. At step 920, the processor 420 mayreceive a user input for selecting a music package.

At step 930, the processor 420 may identify a list of sounds availablein each section included in the first audio of the music package. A listof sounds available in each section may be displayed on the display 410as shown in FIG. 7E. At step 940, the processor 420 may receive a userinput for selecting a sound from the sound list.

At step 950, the processor 420 may edit the first audio in response tothe user input and generate an audio file corresponding to the firstaudio. The audio file generated at step 950 may be combined with thesecond audio generated by the processor 420 based on a user gestureinput and may be used to generate a final audio file (composition file).FIG. 10 is a flowchart of a method of generating a second audio based ona user gesture input in an electronic device according to an embodimentof the present disclosure.

Referring to FIG. 10, at step 1010, the processor 420 may receive a usergesture input entered on the display 410.

At step 1020, the processor 420 may determine a relative pitch of amotif according to a height of a line contained in the user gestureinput.

At step 1030, the processor 420 may determine a rhythm (e.g., beat) ofthe motif according to changes in the line contained in the user gestureinput.

At step 1040, the processor 420 may modify the motif on the basis of avelocity and area of a user gesture input and characteristics of thefirst audio (accompaniment).

At step 1050, the processor 420 may generate melody data by using themodified motif and sound effects corresponding to the characteristics ofthe first audio.

At step 1060, the processor 420 may identify a chord scale included inthe characteristics of the first audio and determine a chordcorresponding to melody data among chords in the chord scale.

At step 1070, the processor 420 may generate a second audio by applyingthe determined chord to the melody data. The generated second audio maybe used in conjunction with the first audio to create an audio file. Theaudio file may correspond to a piece of music finally composed by theuser.

FIG. 11 is a flowchart of a method of an electronic device according toan embodiment of the present disclosure. The method may generate a motifsource by using a user gesture input, or ambient context informationcollected through a sensor or stored in the electronic device.

Referring to FIG. 11, at step 1110, the processor 420 may receiveambient context information. The ambient context information may becollected through a sensor or stored in a memory of the electronicdevice. For example, the ambient context information may indicateprofile information and activity information included in a user's SNSaccount. The ambient context information may also include variousinformation such as local weather of an area where the electronic deviceis located, and a number of steps, movement speed, travel distance, andheart rate of a user.

At step 1120, the processor 420 may determine a music package based onthe ambient context information and extract a motif source. Theprocessor 420 may identify and determine the music package correspondingto the ambient context information among the music packages stored inthe memory. The processor 420 may also generate a motif source inconsideration of a sound output from the electronic device 400 (e.g.music played by a music player application). For example, the processor420 may use a most repeated rhythm and pitch in a sound output from theelectronic device 400 to generate the motif source. At step 1130, theprocessor 420 may identify characteristics of the music package.

At step 1140, the processor 420 may generate melody data based oncharacteristics of the first audio and the generated motif source. Atstep 1150, the processor 420 may apply a chord scale included in thecharacteristics of the first audio to the melody data to generate asecond audio. At step 1160, the processor 420 may combine the generatedsecond audio with the first audio to generate an audio file.

According to an embodiment of the present disclosure, a method for amobile device may include receiving a first user input for selecting amusic package including a first audio and characteristics of a firstaudio; identifying the characteristics of the first audio; receiving asecond user input for generating an audio file from a touch displaycapable of sensing user input; identifying characteristics of a seconduser input; generating melody data based on characteristics of thesecond user input and the characteristics of the first audio; generatinga second audio based on melody data and chord information included inthe first audio data; and generating an audio file by combining thegenerated second audio with the first audio.

Generating melody data may include determining a relative pitch in amotif of a second audio based on a height of a point on a curvegenerated by a second user input; determining a beat in the motif basedon a length of a line included in the second user input; modifying themotif based on characteristics of the second user input andcharacteristics of an accompaniment; and generating melody data based onthe modified motif.

Generating melody data may further include generating the melody data bydifferentiating sound effects in consideration of a drawing order andvelocity of lines included in the second user input.

Modifying a motif may include determining whether a velocity at which aline is drawn in a second user input exceeds a preset value; modifying abeat corresponding to the motif if the velocity exceeds a preset value;and modifying a pitch corresponding to the motif if the velocity is lessthan or equal to a preset value.

Modifying the motif may further include determining a degree to whichthe motif is modified based on a size of an area occupied by the linesincluded in the second user input.

Generating a second audio may include identifying a chord scaleincluding information on chords of a first audio based on acharacteristic of the first audio; and generating a second audio byconverting relative pitch values of notes included in melody data toabsolute pitch values based on chord information corresponding to thesecond audio among pieces of chord information belonging to the chordscale.

The method may further include selecting a music package includingaccompaniment and characteristics of a first audio based on ambientcontext information collected by a sensor of a mobile device; andgenerating melody data based on the ambient context information.

According to an embodiment of the present disclosure, a non-transitorystorage medium storing a computer program that implements a method of amobile device, wherein the computer program, when executed, causes themobile device to receive a first user input for selecting a musicpackage including a first audio and characteristics of the first audio;identify the characteristics of the first audio; receive a second userinput for generating an audio file from a touch display capable ofsensing user input; identify characteristics of the second user input;generate melody data based on the characteristics of the second userinput and the characteristics of the first audio; generate a secondaudio based on the melody data and chord information included in thefirst audio data; and generate an audio file by combining the generatedsecond audio with the first audio.

To generate melody data, a computer program may cause a mobile device todetermine a relative pitch in a motif of a second audio based on aheight of a point on a curve generated by a second user input; determinea beat in the motif based on a length of a line included in the seconduser input; modify the motif based on characteristics of the second userinput and characteristics of accompaniment; and generate melody databased on the modified motif.

To generate melody data, a computer program may cause a mobile device togenerate the melody data by differentiating sound effects inconsideration of a drawing order and velocity of lines included in asecond user input.

To modify a motif, a computer program may cause a mobile device todetermine whether a velocity at which a line is drawn in a second userinput exceeds a preset value; modify a beat corresponding to the motifif the velocity exceeds a preset value; and modify a pitch correspondingto the motif if the velocity is less than or equal to the preset value.

To modify a motif, a computer program may cause a mobile device todetermine a degree to which the motif is modified based on a size of anarea occupied by lines included in a second user input.

To generate a second audio, a computer program may cause a mobile deviceto identify a chord scale including information on chords of a firstaudio based on characteristic of the first audio; and generate a secondaudio by converting relative pitch values of notes included in melodydata to absolute pitch values based on chord information correspondingto the second audio among pieces of chord information belonging to achord scale.

A computer program may further cause a mobile device to select a musicpackage including accompaniment and characteristics of a first audiobased on ambient context information collected by a sensor of the mobiledevice; and generate melody data based on the ambient contextinformation. The method above is described with reference to flowcharts,methods, and computer program products according to embodiments of thepresent disclosure. It will be understood that each block of theflowcharts, and combinations of blocks in the flowcharts, may beimplemented by computer program instructions. The computer programinstructions may be provided to a processor of a general purposecomputer, special purpose computer, or other programmable dataprocessing apparatus to produce a machine, such that the instructions,which are executed via the processor of the computer or otherprogrammable data processing apparatus, create means for implementingthe functions specified in the flowchart block or blocks. The computerprogram instructions may also be stored in a computer usable orcomputer-readable memory that can direct a computer or otherprogrammable data processing apparatus to function in a particularmanner, such that the instructions stored in the computer usable orcomputer-readable memory produce an article of manufacture includinginstruction means that implement the function specified in the flowchartblock or blocks. The computer program instructions may also be loadedonto a computer or other programmable data processing apparatus to causea series of operations to be performed on the computer or otherprogrammable apparatus to produce a computer implemented process suchthat the instructions that are executed on the computer or otherprogrammable apparatus provide operations for implementing the functionsspecified in the flowchart block or blocks.

Each block of the flowcharts may represent a module, a segment, or aportion of code, which includes one or more executable instructions forimplementing the specified logical function(s). It should also be notedthat in some alternative implementations, the functions noted in theblocks may occur out of order. For example, two blocks shown insuccession may, in fact, be executed substantially concurrently or theblocks may sometimes be executed in the reverse order, depending uponthe functionality involved.

Certain aspects of the present disclosure may also be embodied ascomputer readable code on a non-transitory computer readable recordingmedium. A non-transitory computer readable recording medium is any datastorage device that may store data which may be thereafter read by acomputer system. Examples of a non-transitory computer readablerecording medium include a ROM, a RAM, compact disc-ROMs (CD-ROMs),magnetic tapes, floppy disks, and optical data storage devices. Anon-transitory computer readable recording medium may also bedistributed over network coupled computer systems so that computerreadable code is stored and executed in a distributed fashion. Inaddition, functional programs, code, and code segments for accomplishingthe present disclosure may be easily construed by programmers skilled inthe art to which the present disclosure pertains.

Embodiments of the present disclosure may involve the processing ofinput data and the generation of output data to some extent. The inputdata processing and output data generation may be implemented inhardware or software in combination with hardware. For example, certainelectronic components may be employed in a mobile device or similar orrelated circuitry for implementing the functions associated with thevarious embodiments of the present disclosure. Alternatively, one ormore processors operating in accordance with stored instructions mayimplement the functions associated with the embodiments of the presentdisclosure. If such is the case, it is within the scope of the presentdisclosure that such instructions may be stored on one or morenon-transitory processor readable mediums. Examples of the processorreadable mediums include a ROM, a RAM, CD-ROMs, magnetic tapes, floppydisks, and optical data storage devices. The processor readable mediumscan also be distributed over network coupled computer systems so thatthe instructions are stored and executed in a distributed fashion. Inaddition, functional computer programs, instructions, and instructionsegments for accomplishing the present disclosure may be easilyconstrued by programmers skilled in the art to which the presentdisclosure pertains.

Aspects of the embodiments of the present disclosure may be implementedin hardware, firmware or via the execution of software or computer codethat may be stored in a recording medium such as a CD ROM, a DVD, amagnetic tape, a RAM, a floppy disk, a hard disk, or a magneto-opticaldisk or computer code downloaded over a network originally stored on aremote recording medium or a non-transitory machine readable medium andto be stored on a local recording medium, so that the methods of thepresent disclosure may be rendered via such software that is stored onthe recording medium using a general purpose computer, or a specialprocessor or in programmable or dedicated hardware, such as an ASIC oran FPGA. As would be understood in the art, a computer, a processor, amicroprocessor controller or programmable hardware include memorycomponents, e.g., RAM, ROM, flash memory, etc. that may store or receivesoftware or computer code that when accessed and executed by thecomputer, the processor or the hardware implement the methods of thepresent disclosure.

While the present disclosure has been illustrated and described withreference to various embodiments thereof, it will be understood by thoseskilled in the art that various changes in form and details may be madetherein without departing from the scope of the present disclosure asdefined by the appended claims and their equivalents.

What is claimed is:
 1. A mobile device, comprising: a touch displayconfigured to sense a user input; a memory; and a processor configuredto: identify, upon receiving the user input for generating an audio filefrom the touch display, characteristics of the user input andcharacteristics of a first audio included in first audio data stored inthe memory; generate melody data based on the characteristics of theuser input and the characteristics of the first audio; generate a secondaudio based on the melody data and chord information included in thefirst audio data; and generate the audio file by combining the generatedsecond audio with the first audio, wherein the processor is furtherconfigured to: determine a relative pitch in a motif of the second audiobased on a height of a point on a curve generated by the user input;determine a beat in the motif of the second audio based on a length ofthe curve; modify the motif based on the characteristics of the userinput and the characteristics of the first audio; and generate themelody data based on the modified motif.
 2. The mobile device of claim1, wherein the processor is further configured to generate the melodydata by differentiating sound effects in consideration of a drawingorder and velocity of lines included in the user input.
 3. The mobiledevice of claim 1, wherein the processor is further configured todetermine whether the velocity at which a line is drawn in the userinput exceeds a preset value, modify the beat corresponding to the motifif the velocity exceeds the preset value, and modify the relative pitchcorresponding to the motif if the velocity is less than or equal to thepreset value.
 4. The mobile device of claim 1, wherein the memory isconfigured to temporarily or non-temporarily store a music packageincluding the first audio and the first audio data, and wherein theprocessor is further configured to identify, in response to a seconduser input for selecting the music package, a tag of the music package,and determine sound effects to be applied to the second audio based onthe identified tag.
 5. The mobile device of claim 1, wherein theprocessor is further configured to determine a degree to which the motifis modified based on a size of an area occupied by the lines included inthe user input.
 6. The mobile device of claim 1, wherein the processoris further configured to generate at least one phrase by combining thegenerated motif with the modified motif of the generated motif, andgenerate the second audio by using the at least one phrase.
 7. Themobile device of claim 1, wherein the melody data includes relativepitch values corresponding respectively to notes included in the melodydata, and wherein the processor is further configured to generate thesecond audio by converting the relative pitch values corresponding tothe notes included in the melody data to absolute pitch values based ona determined chord.
 8. The mobile device of claim 7, wherein theprocessor is further configured to identify a chord scale of the firstaudio based on the characteristics of the first audio, and generate thesecond audio by converting the relative pitch values of the notesincluded in the melody data to the absolute pitch values based on thechord information corresponding to the second audio among pieces ofchord information belonging to a chord scale.
 9. The mobile device ofclaim 1, further comprising a sensor configured to collect ambientcontext information thereof, and wherein the processor is furtherconfigured to select a music package based on the ambient contextinformation, and generate the second audio based on the ambient contextinformation and characteristics of the first audio included in the musicpackage.
 10. A method for operating a mobile device, the methodcomprising: receiving a first user input for selecting a music packageincluding a first audio and characteristics of the first audio;identifying the characteristics of the first audio; receiving a seconduser input for generating an audio file from a touch display capable ofsensing user input; identifying characteristics of the second userinput; generating melody data based on the characteristics of the seconduser input and the characteristics of the first audio; generating asecond audio based on the melody data and chord information included inthe first audio data; and generating the audio file by combining thegenerated second audio with the first audio, wherein the method furthercomprises: determining a relative pitch in a motif of the second audiobased on a height of a point on a curve generated by the second userinput; determining a beat in the motif based on a length of a lineincluded in the second user input; modifying the motif based on thecharacteristics of the second user input and characteristics of theaccompaniment; and generating the melody data based on the modifiedmotif.
 11. The method of claim 10, wherein generating melody datacomprises generating the melody data by differentiating sound effects inconsideration of a drawing order and velocity of lines included in thesecond user input.
 12. The method of claim 10, wherein modifying themotif comprises: determining whether a velocity at which the line isdrawn in the second user input exceeds a preset value; modifying thebeat corresponding to the motif if the velocity exceeds the presetvalue; and modifying the relative pitch corresponding to the motif ifthe velocity is less than or equal to the preset value.
 13. The methodof claim 10, wherein modifying the motif comprises determining a degreeto which the motif is modified based on a size of an area occupied bythe lines included in the second user input.
 14. The method of claim 10,wherein generating a second audio comprises: identifying a chord scaleincluding information on chords of the first audio based on thecharacteristics of the first audio; and generating the second audio byconverting relative pitch values of notes included in the melody data toabsolute pitch values based on chord information corresponding to thesecond audio among pieces of chord information belonging to a chordscale.
 15. The method of claim 10, further comprising: selecting a musicpackage including an accompaniment and the characteristics of the firstaudio based on ambient context information collected by a sensor of themobile device; and generating the melody data based on the ambientcontext information.
 16. A non-transitory computer-readable storagemedium storing a computer program configured to implement an operationmethod for a mobile device, wherein the computer program, when executed,causes the mobile device to: receive a first user input for selecting amusic package including a first audio and characteristics of the firstaudio; identify the characteristics of the first audio; receive a seconduser input for generating an audio file from a touch display capable ofsensing user input; identify characteristics of the second user input;generate melody data based on the characteristics of the second userinput and the characteristics of the first audio; generate a secondaudio based on the melody data and chord information included in thefirst audio data; and generate the audio file by combining the generatedsecond audio with the first audio, wherein the computer program causesthe mobile device to: determine a relative pitch in a motif of thesecond audio based on a height of a point on a curve generated by a usergesture input; determine a beat in the motif based on a length of thecurve; modify the motif based on characteristics of the user gestureinput and the characteristics of the first audio; and generate themelody data based on the modified motif.
 17. The non-transitorycomputer-readable storage medium of claim 16, wherein the melody dataincludes relative pitch values corresponding respectively to notesincluded in the melody data, and wherein the computer program causes themobile device to generate the second audio by converting the relativepitch values corresponding to the notes included in the melody data toabsolute pitch values based on a determined chord.